home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMICUS17.ADF / kermit / akermit.doc < prev    next >
Text File  |  1989-01-27  |  14KB  |  266 lines

  1. INTRODUCTION
  2.  
  3. This version of Amiga Kermit is a port of the Unix C-Kermit which attempts
  4. to reproduce as much of the functionality of Unix version as possible.  I
  5. had two main goals in porting C-Kermit:  I wanted a reliable remote file
  6. transfer utility, and I wanted to investigate the use of the AmigaDOS
  7. and Exec environments, hopefully adding to level of publicly held Amiga
  8. programming knowledge.
  9.  
  10. Amiga Kermit currently provides a line oriented user interface.  I am not
  11. a mouse and menu fanatic, but I have seen many programs which have been
  12. considerably enhanced by their use.  There are several places in Kermit
  13. where a menu interface would be an asset.  However, in this version of
  14. Kermit, I have concentrated on the functional aspects.
  15.  
  16. As I have stated before, this is a port of the Unix C-Kermit.  The file
  17. ckuker.doc contains detailed documentation on the use of C-Kermit, and
  18. Kermit's internal help can be used as a reference too.  The main
  19. difference between this version and the Unix C-Kermit is that the DIAL
  20. and SCRIPT commands are as yet unimplemented.  Therefore, only Amiga
  21. specific features are noted below.
  22.  
  23. INVOKING C-KERMIT
  24.  
  25. Amiga Kermit is usually invoked from a CLI process.  Currently unresolved
  26. problems will cause it to crash under the Workbench, see ckiker.bwr for
  27. details.  From a CLI window, you generally enter:
  28.    KERMIT
  29. or
  30.    RUN KERMIT
  31. to execute Kermit and start up the Kermit command interpreter.  Kermit
  32. will create its own window and greet you with:
  33.  
  34.    C-Kermit, 4D(060) 18 Apr 86, Commodore Amiga
  35.    Type ? for help
  36.  
  37.    C-Kermit>
  38.  
  39. The cursor will appear following the C-Kermit> prompt.  Typing ? will
  40. produce a list of the items that can be entered at any point.  Typing ?
  41. here will produce a list of commands:
  42.  
  43.    C-Kermit>? Command, one of the following:
  44.     !                  bye                close              connect
  45.     cwd                dial               directory          echo
  46.     exit               finish             get                help
  47.     log                quit               receive            remote
  48.     script             send               server             set
  49.     show               space              statistics         take
  50.  
  51. Typing ? at various points during command entry will help you navigate
  52. through the command processor.  The 'help' command is also quite useful.
  53. Typing 'help' alone gets information about command entry:
  54.  
  55.    C-Kermit>help
  56.  
  57.    Type ? for a list of commands, type 'help x' for any command x.
  58.    While typing commands, use the following special characters:
  59.  
  60.     DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.
  61.     CTRL-W: Delete the most recent word typed.
  62.     CTRL-U: Delete the current line.
  63.     CTRL-R: Redisplay the current line.
  64.     ?       (question mark) display help on the current command or field.
  65.     ESC     (Escape or Altmode) Attempt to complete the current field.
  66.     \       (backslash) include the following character literally.
  67.  
  68.    From system level, type 'kermit -h' to get help about command line args.
  69.  
  70. but 'help' can be used with command lines to get command descriptions.  For
  71. example:
  72.  
  73.    C-Kermit>help bye
  74.    Shut down and log out a remote Kermit server
  75.  
  76. The Kermit command processor is normally exited with the 'QUIT' command.
  77. During Kermit protocol, you can type CTRL-C or CTRL-D to interrupt and
  78. exit Kermit.  Depending on the version of the C runtime libraries used
  79. to link Kermit, the interrupt may also be active during command input, but
  80. it is disabled during connect mode.  You will get a requestor when the
  81. interrupt is activated to allow you to choose to continue Kermit.  However,
  82. any serial read or write that was interrupted will still be aborted.
  83.  
  84. Kermit can also be used without the command processor by specifying an
  85. action on the command line.  You can enter 'kermit -h' at the CLI prompt
  86. to get a list of command line options.  However, unless input is redirected,
  87. or the -q (quiet) option is specified, Kermit will still create a window
  88. for protocol monitoring and interruption.  'KERMIT <*' can be used to
  89. run Kermit completely within the CLI window; however, this does not allow
  90. you to enter control characters, and no console input is seen until you
  91. enter return.  Input and output can be redirected to files to take advantage
  92. of C-Kermit command line file transfer options.  Unfortunately, AmigaDOS
  93. does not implement pipes (yet).
  94.  
  95. KERMIT SERIAL INITIALIZATION AND SETTINGS
  96.  
  97. Amiga Kermit uses the serial device.  Three sources are used to initialize
  98. the serial parameters.  First, the default serial configuration, as set by
  99. Preferences, is copied.  This includes baud rate, and under version 1.2 of
  100. the Workbench, parity, modem control (7-wire vs. 3-wire), and flow control.
  101. Second, command line parameters can be used to override these settings.
  102. For example:
  103.    kermit -b 1200 -p e
  104. can be used to select 1200 baud and even parity independently of the
  105. Preferences settings.  Finally, if the command processor is used, Kermit
  106. looks for a ".kermrc" initialization file, first in the "s:" directory, then
  107. in the current directory, providing that the disk containing each directory
  108. is present in the Amiga.  The ".kermrc" file contains C-Kermit commands
  109. which can be used to initialize the C-Kermit environment as desired.
  110.  
  111. Amiga Kermit has certain peculiarities about its settings.  The line is
  112. always 'serial.device', the name of the device driver being used, and Kermit
  113. will not allow you to 'SET LINE' to anything else.  The modem control mode
  114. is currently selected by 'SET MODEM type', which has two choices: 'DIRECT',
  115. for 3-wire control, and 'GENERIC', for 7-wire control.  Because of the way
  116. the serial device operates, this setting only has an effect when the serial
  117. device is opened after previously being closed, which occurs only when
  118. Kermit starts or after '<escape>H' is used to hang up and exit connect mode.
  119.  
  120. Kermit allows you to set any baud rate between 110 and 292000 baud; however,
  121. it will complain if the baud rate is nonstandard (I added this feature after
  122. several attempts to use my modem at 12000 baud).  Rates of 110 and 111 baud
  123. are implemented as 112 baud.  Extremely high baud rates are of limited
  124. utility.  Rates above 38400 baud can be used for connect mode, but they
  125. result in high error retry rates during data packet transfer and require
  126. good cabling (plus who can you talk to at 57600 baud?).  Because
  127. of protocol overhead, 38400 baud between two Amigas will get an effective
  128. transfer rate of less than 6000 baud (still two times faster than a 1541
  129. disk drive).  Also, if a break is sent looped back to the Amiga while
  130. the serial device is set to a very high baud rate (>100K baud), the Amiga
  131. will hang up, apparently overwhelmed by framing errors.
  132.  
  133. Amiga Kermit uses the serial device in shared mode.  This allows other
  134. programs, like dialers, to use the serial line at the same time, without
  135. exiting Kermit.  However, to avoid confusion, Kermit should not be in
  136. connect, server, or file transfer mode while another program is active.
  137. Note that Kermit always does its own parity generation and stripping, so
  138. it always sets the serial device to use eight bit characters with no parity.
  139.  
  140. WILDCARDING
  141.  
  142. Both the SEND command invoked from the Amiga and a GET sent to an Amiga
  143. in server mode use allow wildcarding, but in the Unix style.  Thus, '*'
  144. wildcard matches an arbitrary string while '?' matches an arbitrary
  145. character.  Therefore, to get all the C source files which begin with 'cki'
  146. from the Amiga server, you could use the command:
  147.  
  148.    C-Kermit>GET cki*.c
  149.  
  150. Multiple '*' wildcards can be used in a pattern; however, beware that
  151. most Unix C-Kermit's may not completely support this form.  Also, the
  152. wildcarding that is used in local and remote server commands that invoke
  153. AmigaDOS commands is the AmigaDOS form.
  154.  
  155. LOCAL AND REMOTE COMMANDS
  156.  
  157. Amiga Kermit provides several ways to invoke AmigaDOS commands from within
  158. Kermit.  Entering '!' at the Kermit prompt will create a CLI process running
  159. in its own window, and wait for it to terminate.  The form '! command' will
  160. invoke the given command command with its output going to Kermit's window.
  161. However, there is currently no way to pause the output of commands invoked
  162. this way, other than the stopgap use of the right mouse button.  The form
  163. 'REMOTE HOST command' can be sent to the Amiga server to execute the given
  164. command remotely on the Amiga.  There is also no input stream available for
  165. commands invoked in either the '! command' or 'REMOTE HOST command' forms,
  166. which can cause problems with some commands that expect input.
  167.  
  168. In addition to the methods given above, various AmigaDOS commands are
  169. invoked by local Kermit commands, and generic remote commands.  These
  170. are listed below:
  171.  
  172.    AmigaDOS command    Local command      Remote generic command
  173.    DELETE files        --none--           REMOTE DELETE files
  174.    TYPE files          --none--           REMOTE TYPE files
  175.    INFO                SPACE              REMOTE SPACE
  176.    LIST obj            DIRECTORY obj      REMOTE DIRECTORY
  177.    STATUS              --none--           REMOTE WHO
  178.  
  179. Any parameters to these commands are expected to use AmigaDOS conventions,
  180. including AmigaDOS wildcarding.  Note that in order to pass a '?' through
  181. the C-Kermit command processor, it must be prefixed with a '\'.
  182.  
  183. You can change the current directory of the Kermit process locally with the
  184. CWD command and remotely with REMOTE CWD.  The local CWD command prints
  185. out the name of the current directory afterwards.  If no new directory
  186. is given, the current directory is not changed, so CWD alone can be used
  187. to determine where the current directory is.
  188.  
  189. SERVER MODE
  190.  
  191. Amiga Kermit completely implements server mode, including the ability
  192. to execute CLI commands remotely.  Currently CLI commands are executed
  193. with their standard output directed to RAM:PIPE-HOLDER, which is then
  194. written back to the commanding Kermit after the command completes.
  195.  
  196. There are a few limitations on the commands that can be executed remotely.
  197. First of all, if they produce voluminous output, the output should be
  198. redirected (redirection is supported on the REMOTE HOST command line)
  199. to avoid using all free memory for the output file.  However, the 
  200. commanding Kermit will probably timeout in the middle of the execution
  201. of any such command.  The best way to use these commands is to
  202.    REMOTE HOST RUN command >outfile parameters
  203. then use REMOTE WHO (which invokes STATUS) to monitor the command for
  204. completion.
  205.  
  206. The input stream for remote commands is NIL:, which is not handled
  207. intelligently by all Amiga commands.  For example, 'REMOTE HOST diskcopy
  208. df0: to df1:' hangs indefinitely while waiting for NIL: to press return.
  209. Finally, since each command is executed in a separate CLI, commands that
  210. set unshared process parameters, like 'cd',  will have null effect (but
  211. 'REMOTE CWD dir' can be used instead).
  212.  
  213. While server mode is active, AmigaDOS requestors are disabled.  This
  214. avoids requiring operator intervention to reset a requestore when the Amiga
  215. server is told to use a file on a disk that does not exist or is write
  216. protected.  However, disabled requestors are currently not inherited by the
  217. CLI processes that the server creates to execute remote commands.
  218. Therefore, a remote AmigaDOS command can still cause the server to become
  219. hung.
  220.  
  221. To shut down the Amiga server, enter BYE or FINISH at the commanding
  222. Kermit.  FINISH exits to whatever level the server was invoked from,
  223. while BYE exits Amiga Kermit altogether.
  224.  
  225. CONNECT MODE
  226.  
  227. Connect mode on Amiga Kermit currently provides you with a 23 line by
  228. 77 column screen.  The Amiga console device is used to provide almost
  229. ANSI terminal emulation.  While you are in connect mode, you can give
  230. single character commands which are prefixed by an escape character
  231. which can be set from within C-Kermit.  By default, the escape
  232. character is CTRL-\.  You can use '<escape>H' to close the serial device
  233. and exit connect mode, which makes the DTR line drop causing most modems
  234. to hang up the phone line.
  235.  
  236. In addition to the standard connect mode commands, extra logging control
  237. has been added.  If a session log file is open, the '<escape>Q' sequence
  238. allows you to temporarily suspend logging.  The '<escape>R' sequence
  239. resumes logging if it has been suspended.
  240.  
  241. Features have also been added to prevent deadlocks while in connect mode
  242. due to spurious XOFF's or bad modem control line states.  When connect
  243. mode is unable to send serial output, keyboard characters are queued until
  244. they can be transmitted.  Queuing continues as long as space is available
  245. in the output buffer.  If the buffer, which is 64 characters long, fills up,
  246. the next keyboard input is discarded and the display 'beeps'.  To get out
  247. of a deadlock situation, you can either exit connect mode, or send a break.
  248. In either case, the output queue is flushed, and current serial output
  249. character is given one second to finish transmitting.  If it does not
  250. complete, the output is aborted, and XOFF mode reset as appropriate.  Then
  251. connect mode is exited or a break is sent, as specified.  When output
  252. characters are queued, connect status (accessed by '<escape>S') will
  253. indicate the number of queued output characters.
  254.  
  255.  
  256. I hope that you find Kermit a useful.  If you have problems or suggestions
  257. related to Amiga Kermit, please contact me at the address below.  I will
  258. be continuing to enhance Amiga Kermit, so new versions will be available
  259. from time to time.
  260.  
  261. Jack J. Rouse
  262. 106 Rubin Ct. Apt. A4
  263. Cary, NC 27511
  264. (919) 467-8000 (work)
  265. (919) 481-1395 (home)
  266.